﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="polls.aspx.cs" Inherits="Golos.Web.polls" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $("#MyPolls").click(function () {
                $("#poll-form-container").empty();
                getMyPolls();
            });

            $("#MyVotes").click(function () {
                $("#poll-form-container").empty();
                getMyVotes();
            });

            $("#MyPolls").click();
        });

        (function ($) {
            //plugin buttonset vertical
            $.fn.buttonsetv = function () {
                $(':radio, :checkbox', this).wrap('<div style="margin: 1px"/>');
                $(this).buttonset();
                $('label:first', this).removeClass('ui-corner-left').addClass('ui-corner-top');
                $('label:last', this).removeClass('ui-corner-right').addClass('ui-corner-bottom');
                mw = 0; // max witdh
                $('label', this).each(function (index) {
                    w = $(this).width();
                    if (w > mw) mw = w;
                });
                $('label', this).each(function(index) {
                    $(this).width(mw);
                });
            };
        })(jQuery);

        $(function () {
            $("#radio").buttonsetv();
        });
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="poll-form-container" class="poll-form-container">
        
    </div>
</asp:Content>

<asp:Content ID="RightMenuContentPlaceHolder" ContentPlaceHolderID="RightMenuContent" runat="server">
    <div id="rightMenu" class="rightMenu" runat="server">
        <div id="radio">
          <input type="radio" id="MyPolls" name="radio" value="1"/><label for="MyPolls">Мои опросы</label>
          <input type="radio" id="MyVotes" name="radio" value="2"/><label for="MyVotes">Мои голоса</label>
          <input type="radio" id="radio3" name="radio" value="3"/><label for="radio3">Choice 3</label>
        </div>    
    </div>
</asp:Content>